
//
//  GoldenviewerTableViewCell.m
//  AoJi
//
//  Created by MinwenYi on 15-3-10.
//  Copyright (c) 2015年 xuanheng. All rights reserved.
//

#import "GoldenviewerTableViewCell.h"

@implementation GoldenviewerTableViewCell


-(id)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{

    self=[super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        [self confige];
    }
    return self;
}

- (void)awakeFromNib {
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}
-(void)confige
{

    //人物图片
    _imgShow = [[UIImageView alloc] initWithFrame:CGRectMake(31/1,34/2,92-45/2, 92-45/2)];
    _imgShow.layer.cornerRadius=viewHeight(_imgShow)/2;
    _imgShow.clipsToBounds=YES;
    
    _imgShow.layer.borderWidth=2;
    _imgShow.layer.borderColor=[self getCorlor:@"ffffff"].CGColor;
    [self addSubview: _imgShow];
    
    //姓名
    _name = [[UILabel alloc] initWithFrame:CGRectMake(viewRight(_imgShow)+44/2,37/2, 100, 20)];
    _name.font = [UIFont systemFontOfSize:13];
    _name.textColor = [UIColor colorWithRed:52/255 green:52/255 blue:52/255 alpha:1.0];
    [self addSubview:_name];
    
    
    //行业工龄
   _workYear = [[UILabel alloc] initWithFrame:CGRectMake(viewLeft(_name),viewBottom(_name)+7, 100, 20)];
    _workYear.layer.cornerRadius=viewHeight(_workYear)/2;
    _workYear.clipsToBounds=YES;
    _workYear.backgroundColor=kCorlor(168, 168, 166);
    _workYear.font = [UIFont systemFontOfSize:13];
    _workYear.textColor = [UIColor whiteColor];
    _workYear.textAlignment=NSTextAlignmentCenter;
    [self addSubview:_workYear];
    
    
    
    //申请擅长
   _name23 = [[UILabel alloc] initWithFrame:CGRectMake(viewLeft(_name),viewBottom(_workYear)+19/2, 100, 20)];
    _name23.font = [UIFont systemFontOfSize:13];
    _name23.textColor = [UIColor colorWithRed:52/255 green:52/255 blue:52/255 alpha:1.0];
    [self addSubview:_name23];
    
    
    //预测按钮
    _yuYueBtn = [[UIButton alloc] initWithFrame:CGRectMake(Mainwidth-38/2-63, 34+2, 63,30)];
    [_yuYueBtn setBackgroundImage:[UIImage imageNamed:@"yuyue.png"] forState:UIControlStateNormal];
    [self addSubview:_yuYueBtn];
    self.backgroundColor=[self getCorlor:@"e6e4e4"];
    
    
    
}


-(void)setParamdic:(NSDictionary *)paramdic
{


    if (_paramdic!=paramdic) {
        _paramdic=paramdic;
      [_imgShow sd_setImageWithURL:[NSURL URLWithString:[_paramdic objectForKey:@"thumb"]] placeholderImage:[UIImage imageNamed:@"moreng.png"]];
       
    _name.text = [_paramdic objectForKey:@"name"];
     
            NSString* tempStr = [NSString stringWithFormat:@"行业工龄:%@",[_paramdic objectForKey:@"experience"]];
            _workYear.text = tempStr;
        _name23.text =[_paramdic objectForKey:@"title"];
    }
    

}
@end
